# Contributor: Will Sinatra <wpsinatra@gmail.com>
# Maintainer: Will Sinatra <wpsinatra@gmail.com>
pkgname=leiningen
pkgver=2.10.0
pkgrel=0
pkgdesc="Automate Clojure Projects"
options="!check" #No Checks
url="https://leiningen.org/"
arch="noarch !riscv64" # blocked by java-jdk
license="EPL-1.0"
depends="bash java-jdk"
subpackages="$pkgname-doc
	$pkgname-bash-completion
	$pkgname-zsh-completion
	"
source="$pkgname-$pkgver.tar.gz::https://github.com/technomancy/leiningen/archive/refs/tags/$pkgver.tar.gz
	https://github.com/technomancy/leiningen/releases/download/$pkgver/leiningen-$pkgver-standalone.jar"

package() {
	install -Dm755 "$builddir/bin/lein-pkg" \
		"$pkgdir/usr/bin/lein"

	install -Dm644 "$builddir/doc/lein.1" \
		"$pkgdir/usr/share/man/man1/lein.1"

	install -Dm 644 "$srcdir/leiningen-$pkgver-standalone.jar" \
		"$pkgdir/usr/share/java/leiningen-$pkgver-standalone.jar"

	install -Dm644 bash_completion.bash \
		"$pkgdir"/usr/share/bash-completion/completions/lein
	install -Dm644 zsh_completion.zsh \
		"$pkgdir"/usr/share/zsh/site-functions/_lein
}

sha512sums="
89e86fcf220d94b635b79f08c20c0e6b32e257ad0b44fdba640f1b020d1897368bfe8c484678a441853625255a3926fc923454a4135f7a32acd6a171cb76215f  leiningen-2.10.0.tar.gz
7b7f0544bc3f9b798f19819eb8cecd4215c85b838c59d385c3eee532a90fa768f939668027a4117ec7dc594cc45117fe70f374a6c2123a67e1c0849d643f882e  leiningen-2.10.0-standalone.jar
"
